<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ page import="java.util.List"%>
    <%@ page import="entities.User"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>List of all users, provisiory</title>
</head>
<body>
<form action="Modify" method="POST">
		<table border="1" width="303">
		<tr>
			<td width="119"><b>ID</b></td>
			<td width="168"><b>Surname</b></td>
			<td width="168"><b>Name</b></td>
			<td width="168"><b>Mail</b></td>
			<td width="119"><b>Age</b></td>
		</tr>
		<%int i; %>

		<% List<User> data= (List<User>)request.getAttribute("data");
			request.getSession().setAttribute("myObjectId2",data);
			for (i=0; i<data.size(); i++ )
		{
		%>
		<tr>
			<td width="119"><%=data.get(i).getUser()%></td>
			<td width="168"><%=data.get(i).getSurname()%></td>
			<td width="168"><%=data.get(i).getName()%></td>
			<td width="168"><%=data.get(i).getMail()%></td>
			<td width="119"><%=data.get(i).getAge()%></td>
			<td > <input type="checkbox" name="<%=i %>" value="true"> Validate<br> </td>
			
		</tr>
		<%}%>
		</table>
		
		<br><br>
		<input type="hidden" name="myObjectId" value="${myObjectId}" />
		
		<input type="submit" action="ValidateUser" value="Validate" >
		
	</form>


</body>
</html>